package com.xm_jd.model.dao;

import java.util.List;

import com.xm_jd.model.entitys.tb_sh;
import com.xm_jd.utils.BaseDao;

public class index6Dao {
	BaseDao<tb_sh> dao = new BaseDao<>(tb_sh.class);
	
	public List<tb_sh> selectSh(int user_id){
		String sql = "SELECT * FROM tb_sh WHERE sh_user_id=?;";
		return dao.selectAll(sql, new Object[]{user_id});
	}
	
	public int addgood(tb_sh sh){
		String sql="INSERT INTO  tb_sh VALUES(NULL,?,?,?,?,?,?);";
		return dao.executeUpdate(sql, new Object[]{sh.getSh_address(),sh.getSh_xxdz(),sh.getSh_name(),sh.getSh_phone(),sh.getSh_ismr(),sh.getSh_user_id()});
	}
}
